<div class="spa_type_info">
<?
    Principio_Library_Common::printErrorsAndMsg();

    for ($i = 0; $i < $this->model_type_ext_template->getExts(); $i++)
    {
?>
    <div class="spa_type_item">
        <div class="subtitle">
            <?=($i == 0) ? "General" : "Ext ".$i ?> Template:
        </div>
        <div>
            <textarea id="ext<?=$i ?>_template"><?=$this->model_type_ext_template->getTemplate($i); ?></textarea>
        </div>
    </div>
<?
    };
?>
    <table border="0" width="100%" class="buttons">
        <tr>
            <td align="right">
                <input class="save" type="submit" name="apply" value="Apply Changes" onClick="ajaxTypes({id: <?=$this->model_type_ext_template->getTypeID(); ?>, action: '<?=$this->action ?>', container: 'container', exts_count: <?=$this->model_type_ext_template->getExts(); ?>, no_refresh: true})"/>
                <input class="cancel" type="submit" name="reset" value="Reset" onClick="ajaxTypes({id: <?=$this->model_type_ext_template->getTypeID(); ?>, action: 'customize', container: 'container', no_apply: true}); return false;"/>
            </td>
        </tr>
    </table>
</div>